package com.hongxun.design.ui.myslider;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;

import com.facebook.drawee.view.SimpleDraweeView;

import com.hongxun.design.R;

/**
 * Created by zerdoor_pc on 2015/12/10.
 */
public class MyTextSliderView extends MyBaseSliderView {
    SimpleDraweeView target;
    TextView description;
    View v;
    public MyTextSliderView(Context context) {
        super(context);
    }

    @Override
    public View getView() {
          v = LayoutInflater.from(this.getActivity()).inflate(R.layout.slider_style_item, null);
          target = (SimpleDraweeView) v.findViewById(R.id.daimajia_slider_image);
          description = (TextView) v.findViewById(R.id.description);
        description.setText(this.getDescription());
        this.bindEventAndShow(v, target);

        return v;
    }

    public void update(){
        description.setText(this.getDescription());
        this.bindEventAndShow(v, target);
    }

}
